3.13.36 \(\int \cos ^5(c+d x) \sin ^n(c+d x) (a+b \sin (c+d x)) \, dx\) [1236]

3.13.36.1 Optimal result
3.13.36.2 Mathematica [A] (verified)
3.13.36.3 Rubi [A] (verified)
3.13.36.4 Maple [A] (verified)
3.13.36.5 Fricas [B] (verification not implemented)
3.13.36.6 Sympy [B] (verification not implemented)
3.13.36.7 Maxima [A] (verification not implemented)
3.13.36.8 Giac [B] (verification not implemented)
3.13.36.9 Mupad [B] (verification not implemented)

3.13.36.1 Optimal result

Integrand size = 27, antiderivative size = 123 \[ \int \cos ^5(c+d x) \sin ^n(c+d x) (a+b \sin (c+d x)) \, dx=\frac {a \sin ^{1+n}(c+d x)}{d (1+n)}+\frac {b \sin ^{2+n}(c+d x)}{d (2+n)}-\frac {2 a \sin ^{3+n}(c+d x)}{d (3+n)}-\frac {2 b \sin ^{4+n}(c+d x)}{d (4+n)}+\frac {a \sin ^{5+n}(c+d x)}{d (5+n)}+\frac {b \sin ^{6+n}(c+d x)}{d (6+n)} \]

output
a*sin(d*x+c)^(1+n)/d/(1+n)+b*sin(d*x+c)^(2+n)/d/(2+n)-2*a*sin(d*x+c)^(3+n) 
/d/(3+n)-2*b*sin(d*x+c)^(4+n)/d/(4+n)+a*sin(d*x+c)^(5+n)/d/(5+n)+b*sin(d*x 
+c)^(6+n)/d/(6+n)
 
3.13.36.2 Mathematica [A] (verified)

Time = 0.15 (sec) , antiderivative size = 97, normalized size of antiderivative = 0.79 \[ \int \cos ^5(c+d x) \sin ^n(c+d x) (a+b \sin (c+d x)) \, dx=\frac {\sin ^{1+n}(c+d x) \left (\frac {a}{1+n}+\frac {b \sin (c+d x)}{2+n}-\frac {2 a \sin ^2(c+d x)}{3+n}-\frac {2 b \sin ^3(c+d x)}{4+n}+\frac {a \sin ^4(c+d x)}{5+n}+\frac {b \sin ^5(c+d x)}{6+n}\right )}{d} \]

input
Integrate[Cos[c + d*x]^5*Sin[c + d*x]^n*(a + b*Sin[c + d*x]),x]
 
output
(Sin[c + d*x]^(1 + n)*(a/(1 + n) + (b*Sin[c + d*x])/(2 + n) - (2*a*Sin[c + 
 d*x]^2)/(3 + n) - (2*b*Sin[c + d*x]^3)/(4 + n) + (a*Sin[c + d*x]^4)/(5 + 
n) + (b*Sin[c + d*x]^5)/(6 + n)))/d
 
3.13.36.3 Rubi [A] (verified)

Time = 0.35 (sec) , antiderivative size = 127, normalized size of antiderivative = 1.03, number of steps used = 5, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.148, Rules used = {3042, 3316, 522, 2009}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int \cos ^5(c+d x) \sin ^n(c+d x) (a+b \sin (c+d x)) \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int \cos (c+d x)^5 \sin (c+d x)^n (a+b \sin (c+d x))dx\)

\(\Big \downarrow \) 3316

\(\displaystyle \frac {\int \sin ^n(c+d x) (a+b \sin (c+d x)) \left (b^2-b^2 \sin ^2(c+d x)\right )^2d(b \sin (c+d x))}{b^5 d}\)

\(\Big \downarrow \) 522

\(\displaystyle \frac {\int \left (a b^4 \sin ^n(c+d x)+b^5 \sin ^{n+1}(c+d x)-2 a b^4 \sin ^{n+2}(c+d x)-2 b^5 \sin ^{n+3}(c+d x)+a b^4 \sin ^{n+4}(c+d x)+b^5 \sin ^{n+5}(c+d x)\right )d(b \sin (c+d x))}{b^5 d}\)

\(\Big \downarrow \) 2009

\(\displaystyle \frac {\frac {a b^5 \sin ^{n+1}(c+d x)}{n+1}-\frac {2 a b^5 \sin ^{n+3}(c+d x)}{n+3}+\frac {a b^5 \sin ^{n+5}(c+d x)}{n+5}+\frac {b^6 \sin ^{n+2}(c+d x)}{n+2}-\frac {2 b^6 \sin ^{n+4}(c+d x)}{n+4}+\frac {b^6 \sin ^{n+6}(c+d x)}{n+6}}{b^5 d}\)

input
Int[Cos[c + d*x]^5*Sin[c + d*x]^n*(a + b*Sin[c + d*x]),x]
 
output
((a*b^5*Sin[c + d*x]^(1 + n))/(1 + n) + (b^6*Sin[c + d*x]^(2 + n))/(2 + n) 
 - (2*a*b^5*Sin[c + d*x]^(3 + n))/(3 + n) - (2*b^6*Sin[c + d*x]^(4 + n))/( 
4 + n) + (a*b^5*Sin[c + d*x]^(5 + n))/(5 + n) + (b^6*Sin[c + d*x]^(6 + n)) 
/(6 + n))/(b^5*d)
 

3.13.36.3.1 Defintions of rubi rules used

rule 522
Int[((e_.)*(x_))^(m_.)*((c_) + (d_.)*(x_))^(n_.)*((a_) + (b_.)*(x_)^2)^(p_. 
), x_Symbol] :> Int[ExpandIntegrand[(e*x)^m*(c + d*x)^n*(a + b*x^2)^p, x], 
x] /; FreeQ[{a, b, c, d, e, m, n}, x] && IGtQ[p, 0]
 

rule 2009
Int[u_, x_Symbol] :> Simp[IntSum[u, x], x] /; SumQ[u]
 

rule 3042
Int[u_, x_Symbol] :> Int[DeactivateTrig[u, x], x] /; FunctionOfTrigOfLinear 
Q[u, x]
 

rule 3316
Int[cos[(e_.) + (f_.)*(x_)]^(p_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_ 
.)*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Simp[1/(b^p* 
f)   Subst[Int[(a + x)^m*(c + (d/b)*x)^n*(b^2 - x^2)^((p - 1)/2), x], x, b* 
Sin[e + f*x]], x] /; FreeQ[{a, b, c, d, e, f, m, n}, x] && IntegerQ[(p - 1) 
/2] && NeQ[a^2 - b^2, 0]
 
3.13.36.4 Maple [A] (verified)

Time = 4.31 (sec) , antiderivative size = 170, normalized size of antiderivative = 1.38

method result size
derivativedivides \(\frac {a \sin \left (d x +c \right ) {\mathrm e}^{n \ln \left (\sin \left (d x +c \right )\right )}}{d \left (1+n \right )}+\frac {a \left (\sin ^{5}\left (d x +c \right )\right ) {\mathrm e}^{n \ln \left (\sin \left (d x +c \right )\right )}}{d \left (5+n \right )}+\frac {b \left (\sin ^{2}\left (d x +c \right )\right ) {\mathrm e}^{n \ln \left (\sin \left (d x +c \right )\right )}}{d \left (2+n \right )}+\frac {b \left (\sin ^{6}\left (d x +c \right )\right ) {\mathrm e}^{n \ln \left (\sin \left (d x +c \right )\right )}}{d \left (6+n \right )}-\frac {2 a \left (\sin ^{3}\left (d x +c \right )\right ) {\mathrm e}^{n \ln \left (\sin \left (d x +c \right )\right )}}{d \left (3+n \right )}-\frac {2 b \left (\sin ^{4}\left (d x +c \right )\right ) {\mathrm e}^{n \ln \left (\sin \left (d x +c \right )\right )}}{d \left (4+n \right )}\) \(170\)
default \(\frac {a \sin \left (d x +c \right ) {\mathrm e}^{n \ln \left (\sin \left (d x +c \right )\right )}}{d \left (1+n \right )}+\frac {a \left (\sin ^{5}\left (d x +c \right )\right ) {\mathrm e}^{n \ln \left (\sin \left (d x +c \right )\right )}}{d \left (5+n \right )}+\frac {b \left (\sin ^{2}\left (d x +c \right )\right ) {\mathrm e}^{n \ln \left (\sin \left (d x +c \right )\right )}}{d \left (2+n \right )}+\frac {b \left (\sin ^{6}\left (d x +c \right )\right ) {\mathrm e}^{n \ln \left (\sin \left (d x +c \right )\right )}}{d \left (6+n \right )}-\frac {2 a \left (\sin ^{3}\left (d x +c \right )\right ) {\mathrm e}^{n \ln \left (\sin \left (d x +c \right )\right )}}{d \left (3+n \right )}-\frac {2 b \left (\sin ^{4}\left (d x +c \right )\right ) {\mathrm e}^{n \ln \left (\sin \left (d x +c \right )\right )}}{d \left (4+n \right )}\) \(170\)
parallelrisch \(\frac {\left (\frac {b \left (5+n \right ) \left (3+n \right ) \left (1+n \right ) \left (n^{2}+6 n -120\right ) \cos \left (2 d x +2 c \right )}{4}-\frac {b \left (n +12\right ) \left (5+n \right ) \left (3+n \right ) \left (2+n \right ) \left (1+n \right ) \cos \left (4 d x +4 c \right )}{2}-\frac {b \left (5+n \right ) \left (4+n \right ) \left (3+n \right ) \left (2+n \right ) \left (1+n \right ) \cos \left (6 d x +6 c \right )}{4}+\frac {3 \left (4+n \right ) \left (1+n \right ) \left (2+n \right ) \left (6+n \right ) \left (n +\frac {25}{3}\right ) a \sin \left (3 d x +3 c \right )}{2}+\frac {a \left (6+n \right ) \left (4+n \right ) \left (3+n \right ) \left (2+n \right ) \left (1+n \right ) \sin \left (5 d x +5 c \right )}{2}+a \left (6+n \right ) \left (4+n \right ) \left (2+n \right ) \left (n^{2}+12 n +75\right ) \sin \left (d x +c \right )+\frac {b \left (5+n \right ) \left (3+n \right ) \left (1+n \right ) \left (n^{2}+14 n +88\right )}{2}\right ) \left (\sin ^{n}\left (d x +c \right )\right )}{8 \left (n^{3}+12 n^{2}+44 n +48\right ) d \left (n^{3}+9 n^{2}+23 n +15\right )}\) \(227\)

input
int(cos(d*x+c)^5*sin(d*x+c)^n*(a+b*sin(d*x+c)),x,method=_RETURNVERBOSE)
 
output
a/d/(1+n)*sin(d*x+c)*exp(n*ln(sin(d*x+c)))+a/d/(5+n)*sin(d*x+c)^5*exp(n*ln 
(sin(d*x+c)))+b/d/(2+n)*sin(d*x+c)^2*exp(n*ln(sin(d*x+c)))+b/d/(6+n)*sin(d 
*x+c)^6*exp(n*ln(sin(d*x+c)))-2*a/d/(3+n)*sin(d*x+c)^3*exp(n*ln(sin(d*x+c) 
))-2*b/d/(4+n)*sin(d*x+c)^4*exp(n*ln(sin(d*x+c)))
 
3.13.36.5 Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 282 vs. \(2 (123) = 246\).

Time = 0.35 (sec) , antiderivative size = 282, normalized size of antiderivative = 2.29 \[ \int \cos ^5(c+d x) \sin ^n(c+d x) (a+b \sin (c+d x)) \, dx=-\frac {{\left ({\left (b n^{5} + 15 \, b n^{4} + 85 \, b n^{3} + 225 \, b n^{2} + 274 \, b n + 120 \, b\right )} \cos \left (d x + c\right )^{6} - {\left (b n^{5} + 11 \, b n^{4} + 41 \, b n^{3} + 61 \, b n^{2} + 30 \, b n\right )} \cos \left (d x + c\right )^{4} - 8 \, b n^{3} - 72 \, b n^{2} - 4 \, {\left (b n^{4} + 9 \, b n^{3} + 23 \, b n^{2} + 15 \, b n\right )} \cos \left (d x + c\right )^{2} - 184 \, b n - {\left ({\left (a n^{5} + 16 \, a n^{4} + 95 \, a n^{3} + 260 \, a n^{2} + 324 \, a n + 144 \, a\right )} \cos \left (d x + c\right )^{4} + 8 \, a n^{3} + 96 \, a n^{2} + 4 \, {\left (a n^{4} + 13 \, a n^{3} + 56 \, a n^{2} + 92 \, a n + 48 \, a\right )} \cos \left (d x + c\right )^{2} + 352 \, a n + 384 \, a\right )} \sin \left (d x + c\right ) - 120 \, b\right )} \sin \left (d x + c\right )^{n}}{d n^{6} + 21 \, d n^{5} + 175 \, d n^{4} + 735 \, d n^{3} + 1624 \, d n^{2} + 1764 \, d n + 720 \, d} \]

input
integrate(cos(d*x+c)^5*sin(d*x+c)^n*(a+b*sin(d*x+c)),x, algorithm="fricas" 
)
 
output
-((b*n^5 + 15*b*n^4 + 85*b*n^3 + 225*b*n^2 + 274*b*n + 120*b)*cos(d*x + c) 
^6 - (b*n^5 + 11*b*n^4 + 41*b*n^3 + 61*b*n^2 + 30*b*n)*cos(d*x + c)^4 - 8* 
b*n^3 - 72*b*n^2 - 4*(b*n^4 + 9*b*n^3 + 23*b*n^2 + 15*b*n)*cos(d*x + c)^2 
- 184*b*n - ((a*n^5 + 16*a*n^4 + 95*a*n^3 + 260*a*n^2 + 324*a*n + 144*a)*c 
os(d*x + c)^4 + 8*a*n^3 + 96*a*n^2 + 4*(a*n^4 + 13*a*n^3 + 56*a*n^2 + 92*a 
*n + 48*a)*cos(d*x + c)^2 + 352*a*n + 384*a)*sin(d*x + c) - 120*b)*sin(d*x 
 + c)^n/(d*n^6 + 21*d*n^5 + 175*d*n^4 + 735*d*n^3 + 1624*d*n^2 + 1764*d*n 
+ 720*d)
 
3.13.36.6 Sympy [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 8675 vs. \(2 (104) = 208\).

Time = 8.82 (sec) , antiderivative size = 8675, normalized size of antiderivative = 70.53 \[ \int \cos ^5(c+d x) \sin ^n(c+d x) (a+b \sin (c+d x)) \, dx=\text {Too large to display} \]

input
integrate(cos(d*x+c)**5*sin(d*x+c)**n*(a+b*sin(d*x+c)),x)
 
output
Piecewise((x*(a + b*sin(c))*sin(c)**n*cos(c)**5, Eq(d, 0)), (-8*a/(15*d*si 
n(c + d*x)) + 4*a*cos(c + d*x)**2/(15*d*sin(c + d*x)**3) - a*cos(c + d*x)* 
*4/(5*d*sin(c + d*x)**5) + b*log(sin(c + d*x))/d + b*cos(c + d*x)**2/(2*d* 
sin(c + d*x)**2) - b*cos(c + d*x)**4/(4*d*sin(c + d*x)**4), Eq(n, -6)), (a 
*log(sin(c + d*x))/d + a*cos(c + d*x)**2/(2*d*sin(c + d*x)**2) - a*cos(c + 
 d*x)**4/(4*d*sin(c + d*x)**4) + 8*b*sin(c + d*x)/(3*d) + 4*b*cos(c + d*x) 
**2/(3*d*sin(c + d*x)) - b*cos(c + d*x)**4/(3*d*sin(c + d*x)**3), Eq(n, -5 
)), (-a*tan(c/2 + d*x/2)**10/(24*d*tan(c/2 + d*x/2)**7 + 48*d*tan(c/2 + d* 
x/2)**5 + 24*d*tan(c/2 + d*x/2)**3) + 19*a*tan(c/2 + d*x/2)**8/(24*d*tan(c 
/2 + d*x/2)**7 + 48*d*tan(c/2 + d*x/2)**5 + 24*d*tan(c/2 + d*x/2)**3) + 11 
0*a*tan(c/2 + d*x/2)**6/(24*d*tan(c/2 + d*x/2)**7 + 48*d*tan(c/2 + d*x/2)* 
*5 + 24*d*tan(c/2 + d*x/2)**3) + 110*a*tan(c/2 + d*x/2)**4/(24*d*tan(c/2 + 
 d*x/2)**7 + 48*d*tan(c/2 + d*x/2)**5 + 24*d*tan(c/2 + d*x/2)**3) + 19*a*t 
an(c/2 + d*x/2)**2/(24*d*tan(c/2 + d*x/2)**7 + 48*d*tan(c/2 + d*x/2)**5 + 
24*d*tan(c/2 + d*x/2)**3) - a/(24*d*tan(c/2 + d*x/2)**7 + 48*d*tan(c/2 + d 
*x/2)**5 + 24*d*tan(c/2 + d*x/2)**3) + 48*b*log(tan(c/2 + d*x/2)**2 + 1)*t 
an(c/2 + d*x/2)**7/(24*d*tan(c/2 + d*x/2)**7 + 48*d*tan(c/2 + d*x/2)**5 + 
24*d*tan(c/2 + d*x/2)**3) + 96*b*log(tan(c/2 + d*x/2)**2 + 1)*tan(c/2 + d* 
x/2)**5/(24*d*tan(c/2 + d*x/2)**7 + 48*d*tan(c/2 + d*x/2)**5 + 24*d*tan(c/ 
2 + d*x/2)**3) + 48*b*log(tan(c/2 + d*x/2)**2 + 1)*tan(c/2 + d*x/2)**3/...
 
3.13.36.7 Maxima [A] (verification not implemented)

Time = 0.21 (sec) , antiderivative size = 109, normalized size of antiderivative = 0.89 \[ \int \cos ^5(c+d x) \sin ^n(c+d x) (a+b \sin (c+d x)) \, dx=\frac {\frac {b \sin \left (d x + c\right )^{n + 6}}{n + 6} + \frac {a \sin \left (d x + c\right )^{n + 5}}{n + 5} - \frac {2 \, b \sin \left (d x + c\right )^{n + 4}}{n + 4} - \frac {2 \, a \sin \left (d x + c\right )^{n + 3}}{n + 3} + \frac {b \sin \left (d x + c\right )^{n + 2}}{n + 2} + \frac {a \sin \left (d x + c\right )^{n + 1}}{n + 1}}{d} \]

input
integrate(cos(d*x+c)^5*sin(d*x+c)^n*(a+b*sin(d*x+c)),x, algorithm="maxima" 
)
 
output
(b*sin(d*x + c)^(n + 6)/(n + 6) + a*sin(d*x + c)^(n + 5)/(n + 5) - 2*b*sin 
(d*x + c)^(n + 4)/(n + 4) - 2*a*sin(d*x + c)^(n + 3)/(n + 3) + b*sin(d*x + 
 c)^(n + 2)/(n + 2) + a*sin(d*x + c)^(n + 1)/(n + 1))/d
 
3.13.36.8 Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 379 vs. \(2 (123) = 246\).

Time = 0.35 (sec) , antiderivative size = 379, normalized size of antiderivative = 3.08 \[ \int \cos ^5(c+d x) \sin ^n(c+d x) (a+b \sin (c+d x)) \, dx=\frac {\frac {{\left (n^{2} \sin \left (d x + c\right )^{n} \sin \left (d x + c\right )^{5} + 4 \, n \sin \left (d x + c\right )^{n} \sin \left (d x + c\right )^{5} - 2 \, n^{2} \sin \left (d x + c\right )^{n} \sin \left (d x + c\right )^{3} + 3 \, \sin \left (d x + c\right )^{n} \sin \left (d x + c\right )^{5} - 12 \, n \sin \left (d x + c\right )^{n} \sin \left (d x + c\right )^{3} + n^{2} \sin \left (d x + c\right )^{n} \sin \left (d x + c\right ) - 10 \, \sin \left (d x + c\right )^{n} \sin \left (d x + c\right )^{3} + 8 \, n \sin \left (d x + c\right )^{n} \sin \left (d x + c\right ) + 15 \, \sin \left (d x + c\right )^{n} \sin \left (d x + c\right )\right )} a}{n^{3} + 9 \, n^{2} + 23 \, n + 15} + \frac {{\left (n^{2} \sin \left (d x + c\right )^{n} \sin \left (d x + c\right )^{6} + 6 \, n \sin \left (d x + c\right )^{n} \sin \left (d x + c\right )^{6} - 2 \, n^{2} \sin \left (d x + c\right )^{n} \sin \left (d x + c\right )^{4} + 8 \, \sin \left (d x + c\right )^{n} \sin \left (d x + c\right )^{6} - 16 \, n \sin \left (d x + c\right )^{n} \sin \left (d x + c\right )^{4} + n^{2} \sin \left (d x + c\right )^{n} \sin \left (d x + c\right )^{2} - 24 \, \sin \left (d x + c\right )^{n} \sin \left (d x + c\right )^{4} + 10 \, n \sin \left (d x + c\right )^{n} \sin \left (d x + c\right )^{2} + 24 \, \sin \left (d x + c\right )^{n} \sin \left (d x + c\right )^{2}\right )} b}{n^{3} + 12 \, n^{2} + 44 \, n + 48}}{d} \]

input
integrate(cos(d*x+c)^5*sin(d*x+c)^n*(a+b*sin(d*x+c)),x, algorithm="giac")
 
output
((n^2*sin(d*x + c)^n*sin(d*x + c)^5 + 4*n*sin(d*x + c)^n*sin(d*x + c)^5 - 
2*n^2*sin(d*x + c)^n*sin(d*x + c)^3 + 3*sin(d*x + c)^n*sin(d*x + c)^5 - 12 
*n*sin(d*x + c)^n*sin(d*x + c)^3 + n^2*sin(d*x + c)^n*sin(d*x + c) - 10*si 
n(d*x + c)^n*sin(d*x + c)^3 + 8*n*sin(d*x + c)^n*sin(d*x + c) + 15*sin(d*x 
 + c)^n*sin(d*x + c))*a/(n^3 + 9*n^2 + 23*n + 15) + (n^2*sin(d*x + c)^n*si 
n(d*x + c)^6 + 6*n*sin(d*x + c)^n*sin(d*x + c)^6 - 2*n^2*sin(d*x + c)^n*si 
n(d*x + c)^4 + 8*sin(d*x + c)^n*sin(d*x + c)^6 - 16*n*sin(d*x + c)^n*sin(d 
*x + c)^4 + n^2*sin(d*x + c)^n*sin(d*x + c)^2 - 24*sin(d*x + c)^n*sin(d*x 
+ c)^4 + 10*n*sin(d*x + c)^n*sin(d*x + c)^2 + 24*sin(d*x + c)^n*sin(d*x + 
c)^2)*b/(n^3 + 12*n^2 + 44*n + 48))/d
 
3.13.36.9 Mupad [B] (verification not implemented)

Time = 16.70 (sec) , antiderivative size = 550, normalized size of antiderivative = 4.47 \[ \int \cos ^5(c+d x) \sin ^n(c+d x) (a+b \sin (c+d x)) \, dx=\frac {b\,{\sin \left (c+d\,x\right )}^n\,\left (n^5+23\,n^4+237\,n^3+1129\,n^2+2234\,n+1320\right )}{16\,d\,\left (n^6+21\,n^5+175\,n^4+735\,n^3+1624\,n^2+1764\,n+720\right )}-\frac {b\,{\sin \left (c+d\,x\right )}^n\,\cos \left (6\,c+6\,d\,x\right )\,\left (n^5+15\,n^4+85\,n^3+225\,n^2+274\,n+120\right )}{32\,d\,\left (n^6+21\,n^5+175\,n^4+735\,n^3+1624\,n^2+1764\,n+720\right )}-\frac {b\,{\sin \left (c+d\,x\right )}^n\,\cos \left (4\,c+4\,d\,x\right )\,\left (n^5+23\,n^4+173\,n^3+553\,n^2+762\,n+360\right )}{16\,d\,\left (n^6+21\,n^5+175\,n^4+735\,n^3+1624\,n^2+1764\,n+720\right )}-\frac {a\,\sin \left (c+d\,x\right )\,{\sin \left (c+d\,x\right )}^n\,\left (n^5\,1{}\mathrm {i}+n^4\,24{}\mathrm {i}+n^3\,263{}\mathrm {i}+n^2\,1476{}\mathrm {i}+n\,3876{}\mathrm {i}+3600{}\mathrm {i}\right )\,1{}\mathrm {i}}{8\,d\,\left (n^6+21\,n^5+175\,n^4+735\,n^3+1624\,n^2+1764\,n+720\right )}-\frac {b\,{\sin \left (c+d\,x\right )}^n\,\cos \left (2\,c+2\,d\,x\right )\,\left (-n^5-15\,n^4+43\,n^3+927\,n^2+2670\,n+1800\right )}{32\,d\,\left (n^6+21\,n^5+175\,n^4+735\,n^3+1624\,n^2+1764\,n+720\right )}-\frac {a\,{\sin \left (c+d\,x\right )}^n\,\sin \left (5\,c+5\,d\,x\right )\,\left (n^5\,1{}\mathrm {i}+n^4\,16{}\mathrm {i}+n^3\,95{}\mathrm {i}+n^2\,260{}\mathrm {i}+n\,324{}\mathrm {i}+144{}\mathrm {i}\right )\,1{}\mathrm {i}}{16\,d\,\left (n^6+21\,n^5+175\,n^4+735\,n^3+1624\,n^2+1764\,n+720\right )}-\frac {a\,{\sin \left (c+d\,x\right )}^n\,\sin \left (3\,c+3\,d\,x\right )\,\left (n^5\,3{}\mathrm {i}+n^4\,64{}\mathrm {i}+n^3\,493{}\mathrm {i}+n^2\,1676{}\mathrm {i}+n\,2444{}\mathrm {i}+1200{}\mathrm {i}\right )\,1{}\mathrm {i}}{16\,d\,\left (n^6+21\,n^5+175\,n^4+735\,n^3+1624\,n^2+1764\,n+720\right )} \]

input
int(cos(c + d*x)^5*sin(c + d*x)^n*(a + b*sin(c + d*x)),x)
 
output
(b*sin(c + d*x)^n*(2234*n + 1129*n^2 + 237*n^3 + 23*n^4 + n^5 + 1320))/(16 
*d*(1764*n + 1624*n^2 + 735*n^3 + 175*n^4 + 21*n^5 + n^6 + 720)) - (b*sin( 
c + d*x)^n*cos(6*c + 6*d*x)*(274*n + 225*n^2 + 85*n^3 + 15*n^4 + n^5 + 120 
))/(32*d*(1764*n + 1624*n^2 + 735*n^3 + 175*n^4 + 21*n^5 + n^6 + 720)) - ( 
b*sin(c + d*x)^n*cos(4*c + 4*d*x)*(762*n + 553*n^2 + 173*n^3 + 23*n^4 + n^ 
5 + 360))/(16*d*(1764*n + 1624*n^2 + 735*n^3 + 175*n^4 + 21*n^5 + n^6 + 72 
0)) - (a*sin(c + d*x)*sin(c + d*x)^n*(n*3876i + n^2*1476i + n^3*263i + n^4 
*24i + n^5*1i + 3600i)*1i)/(8*d*(1764*n + 1624*n^2 + 735*n^3 + 175*n^4 + 2 
1*n^5 + n^6 + 720)) - (b*sin(c + d*x)^n*cos(2*c + 2*d*x)*(2670*n + 927*n^2 
 + 43*n^3 - 15*n^4 - n^5 + 1800))/(32*d*(1764*n + 1624*n^2 + 735*n^3 + 175 
*n^4 + 21*n^5 + n^6 + 720)) - (a*sin(c + d*x)^n*sin(5*c + 5*d*x)*(n*324i + 
 n^2*260i + n^3*95i + n^4*16i + n^5*1i + 144i)*1i)/(16*d*(1764*n + 1624*n^ 
2 + 735*n^3 + 175*n^4 + 21*n^5 + n^6 + 720)) - (a*sin(c + d*x)^n*sin(3*c + 
 3*d*x)*(n*2444i + n^2*1676i + n^3*493i + n^4*64i + n^5*3i + 1200i)*1i)/(1 
6*d*(1764*n + 1624*n^2 + 735*n^3 + 175*n^4 + 21*n^5 + n^6 + 720))